﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace HostingDomain3
{
    public partial class HostingWF : System.Web.UI.Page
    {
        //Call Class
       
        Hosting.Class.CategoryDetail CaDetail = new Hosting.Class.CategoryDetail();
        Hosting.Class.ServiceCategories Services = new Hosting.Class.ServiceCategories();
        Hosting.Class.ServicePackage serP = new Hosting.Class.ServicePackage();
        Hosting.Class.CategoryTitle CaTitle = new Hosting.Class.CategoryTitle();

        protected void Page_Load(object sender, EventArgs e)
        {
            ServicesFist();
            Catelory();
            CATitle();
            CADetail();
        }

        //GetAll Service Page
        public void ServicesFist() 
        {

            var ser = serP.getAllHosting("1","1");
            ListViewServicePak.DataSource = ser;
            ListViewServicePak.DataBind();
           
        }

        //GetAll Catelory
        public void Catelory() 
        {
           
            var CaPro = Services.getAll(); 
            ListViewCaterory.DataSource = CaPro;
            ListViewCaterory.DataBind();
           
            
            
        }

        //Getall Title

        public void CATitle() 
        {

            var CaDe = CaTitle.getAll("1") ;

            ListViewTitle.DataSource = CaDe;
            ListViewTitle.DataBind();
          
        }

        //GetAll Detail

        public void CADetail() 
        {
           var CaDetails =  CaDetail.getAll();
           foreach (var a in CaDetails)
           {
               if (a.CDActive == true && a.CTName == "Disk space") 
               {
                   ListviewDetaiDiskspace.DataSource = CaDetails;
                   ListviewDetaiDiskspace.DataBind();
               }
           }
           
        }
    }
}